package masterjava.common.client.gwt.rpc;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * User: gkislin
 * Date: 7/26/11
 */
public class CallbackDecorator<T> implements AsyncCallback<T> {
    private final AsyncCallback<T> callback;

    public CallbackDecorator(AsyncCallback<T> callback) {
        this.callback = callback;
    }

    @Override
    public void onFailure(Throwable caught) {
        callback.onFailure(caught);
    }

    @Override
    public void onSuccess(T result) {
        callback.onSuccess(result);
    }
}
